//
// Created by Zhangwj on 2023/9/27.
//

#ifndef COMPILE_TASK2_ADDEXPNODE_H
#define COMPILE_TASK2_ADDEXPNODE_H


#include "SyntaxTreeNode.h"
#include "../Parser.h"
#include "MulExpNode.h"

class AddExpNode : public SyntaxTreeNode {
public:
    // AddExp → MulExp | AddExp ('+' | '−') MulExp
    //改写为 AddExp -> MulExp { ('+' | '−') MulExp } 遍历时要改成原来的语法书形状
    std::vector<std::unique_ptr<MulExpNode>> MulExps;
    std::vector<LexType> Ops;

    static std::unique_ptr<AddExpNode> AddExpParser(Parser &parser);
};


#endif //COMPILE_TASK2_ADDEXPNODE_H
